package com.pth.admin.action;

import com.opensymphony.xwork2.ActionSupport;
import com.pth.model.Jianjie;
import com.pth.service.JianjieService;
import com.pth.utils.JianjieSign;
import com.pth.utils.timeUtil;

public class AddJianjieAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	
	private JianjieService jianjieService;
	private Jianjie jianjie;

	public void setJianjieService(JianjieService jianjieService) {
		this.jianjieService = jianjieService;
	}


	public JianjieService getJianjieService() {
		return jianjieService;
	}


	public void setJianjie(Jianjie jianjie) {
		this.jianjie = jianjie;
	}


	public Jianjie getJianjie() {
		return jianjie;
	}
	
	@Override
	public String execute() throws Exception {

		jianjie.setSign(JianjieSign.CONTENT);
		jianjie.setPublishtime(timeUtil.getCurrentDate());
		jianjie.setScannum(0);
		
		jianjieService.add(jianjie);
		
		return SUCCESS;
	}
	
	
	
}
